import request from '@/utils/request';

//获取附件地址
export function getAttachUrl(data) {
	return request({
		method: 'get',
		headers: {
			noNeedLogin: true
		},
		url: 'openApi/system/queryPathById/' + data,
	})
}

//获取服务器时间
export function getServerTime() {
	return request({
		method: 'get',
		headers: {
			noNeedLogin: true
		},
		url: 'openApi/image/genNowTime',
	})
}

//发送验证码
export function sendVerifyCode(data) {
	return request({
		method: 'post',
		headers: {
			noNeedLogin: true
		},
		url: 'openApi/image/register',
		data
	})
}

//重置用户密码
export function resetUserPass(data) {
	return request({
		method: 'post',
		headers: {
			noNeedLogin: true
		},
		url: 'openApi/system/findPass',
		data,
	})
}

//获取网站基本信息
export function siteBaseInfo() {
	return request({
		method: 'get',
		headers: {
			noNeedLogin: true
		},
		url: 'openApi/system/querySite'
	})
}

//获取数据字典数据
export function getDictData() {
	return request({
		method: 'get',
		url: 'openApi/system/queryDefinition',
		headers: {
			noNeedLogin: true
		}
	})
}

export function getNetMonitorData(params) { //获取网络监控数据
	return request({
		method: 'get',
		url: 'openApi/system/getServer',
		params,
	})
}

//获取日志分类数据
export function getLogTypeData(params) {
	return request({
		method: 'get',
		url: 'openApi/system/defEnumList',
		params,
	})
}